import DraggableResizable from "../views/draggable-resizable/index.vue";
import NumberRoll from "../views/number-roll/index.vue";
import AddShop from "../views/add-shop/index.vue";
import VirtualList from "../views/virtual-list/index.vue";
import { createRouter, createWebHistory } from "vue-router";
export const routes = [
  {
    name: "home",
    path: "/",
    redirect: "/draggableResizable",
  },
  {
    name: "DraggableResizable",
    path: "/draggableResizable",
    component: DraggableResizable,
    meta: {
      title: "拖拽内容",
    },
  },
  {
    name: "NumberRoll",
    path: "/numberRoll",
    component: NumberRoll,
    meta: {
      title: "数字滚动特效",
    },
  },
  {
    name: "AddShop",
    path: "/addShop",
    component: AddShop,
    meta: {
      title: "添加到购物车动效",
    },
  },
  {
    name: "VirtualList",
    path: "/virtualList",
    component: VirtualList,
    meta: {
      title: "虚拟列表",
    },
  },
];

export const router = createRouter({
  history: createWebHistory(),
  routes,
});
